﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductEdit.ascx.cs" Inherits="Controls_BackEnd_ProductEdit" %>
<%@ Import Namespace="Business" %>
<%@ Register Src="../Common/RadEditor.ascx" TagName="AjaxEditor" TagPrefix="uc1" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <!-- start content-outer -->
        <div id="content-outer">
            <!-- start content -->
            <div id="content">
                <div id="page-heading">
                    <h1>
                        <%=string.Format(Resources.Resource.Update,Resources.Resource.ProductList) %></h1>
                </div>
                <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
                    <tr>
                        <th rowspan="3" class="sized">
                            <img src="<%=Config.ApplicationUrl %>resources/images/admin/shared/side_shadowleft.jpg"
                                width="20" height="300" alt="" />
                        </th>
                        <th class="topleft">
                        </th>
                        <td id="tbl-border-top">
                            &nbsp;
                        </td>
                        <th class="topright">
                        </th>
                        <th rowspan="3" class="sized">
                            <img src="<%=Config.ApplicationUrl %>resources/images/admin/shared/side_shadowright.jpg"
                                width="20" height="300" alt="" />
                        </th>
                    </tr>
                    <tr>
                        <td id="tbl-border-left">
                        </td>
                        <td>
                            <!--  start content-table-inner -->
                            <div id="content-table-inner">
                                <table border="0" width="100%" cellpadding="0" cellspacing="0">
                                    <tr valign="top">
                                        <td>
                                            <!-- start id-form -->
                                            <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                                                <tr>
                                                    <th valign="top">
                                                        <%=string.Format(Resources.Resource.Code, Resources.Resource.Product.ToLower())%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:TextBox ID="txtCode" class="inp-form" MaxLength="128" runat="server"></asp:TextBox>
                                                    </td>
                                                    <td rowspan="6">
                                                        <%-- <div class="error-left">
                                                        </div>
                                                        <div class="error-inner">
                                                            This field is required.</div>--%>
                                                        <asp:Image ID="ImgAvarta" runat="server" Height="120px" ImageUrl="~/Resources/images/admin/forms/NoImages.jpg"
                                                            Width="120px" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=string.Format(Resources.Resource.Name, Resources.Resource.Product.ToLower())%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:TextBox ID="txtName" class="inp-form" MaxLength="128" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Alias %>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:TextBox ID="txtAlias" class="inp-form" MaxLength="256" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Category%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:DropDownList ID="ddlcate" class="styledselect_form_1" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Units%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:DropDownList ID="ddlUnit" class="styledselect_form_1" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Region%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:DropDownList ID="ddlRegion" class="styledselect_form_1" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Avata%>
                                                        :
                                                    </th>
                                                    <td style="width: 420px;">
                                                        <div style="float: left; width: 190px; height: 25px">
                                                            <asp:TextBox ID="txtImage" Style="cursor: pointer;" ToolTip="Click heer to upload image."
                                                                ReadOnly="true" class="inp-form" runat="server"></asp:TextBox></div>
                                                        <div style="float: left; width: 22px; height: 25px; margin-left: 10px">
                                                            <img id="img1" onclick="WareHouseImage();" style="cursor: pointer;" src="<%=Config.ApplicationUrl %>resources/images/admin/forms/icon_calendar.jpg"
                                                                alt="" />
                                                        </div>
                                                        <div style="float: left; width: 180px; height: 25px; margin-left: 10px">
                                                            <div class="bubble-left">
                                                            </div>
                                                            <div class="bubble-inner">
                                                                JPEG, GIF 5MB max per image</div>
                                                            <div class="bubble-right">
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td style="text-align: left; min-width: 100px;">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                    </th>
                                                    <td style="color:#2E74B2; font-weight: normal; font-style: italic;">
                                                        <%=Resources.Resource.DesImage%>
                                                        :
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Currentcy%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:DropDownList ID="ddlCurency" class="styledselect_form_1" runat="server">
                                                            <asp:ListItem Value="USD" Text="USD"></asp:ListItem>
                                                            <asp:ListItem Value="VNĐ" Text="VNĐ"></asp:ListItem>
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Price%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:TextBox ID="txtPrice" class="inp-form" MaxLength="18" runat="server"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Since%>
                                                        :
                                                    </th>
                                                    <td style="width: 420px">
                                                        <div style="float: left; width: 190px; height: 25px">
                                                            <asp:TextBox ID="txtStartDate" class="inp-form" MaxLength="18" ReadOnly="true" runat="server"></asp:TextBox></div>
                                                        <div style="float: left; width: 50px; height: 25px; margin-left: 10px">
                                                            <img id="imgstart" style="cursor: pointer;" src="<%=Config.ApplicationUrl %>resources/images/admin/forms/icon_calendar.jpg"
                                                                alt="" />
                                                        </div>
                                                        <div style="float: left; width: 160px; height: 25px; margin-left: 10px">
                                                            <div class="bubble-left">
                                                            </div>
                                                            <div class="bubble-inner">
                                                                Date format by MM/dd/yyyy</div>
                                                            <div class="bubble-right">
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Deadline%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <div style="float: left; width: 190px; height: 25px">
                                                            <asp:TextBox ID="txtDeadline" class="inp-form" MaxLength="18" ReadOnly="true" runat="server"></asp:TextBox></div>
                                                        <div style="float: left; width: 50px; height: 25px; margin-left: 10px">
                                                            <img id="imgdeadline" style="cursor: pointer;" src="<%=Config.ApplicationUrl %>resources/images/admin/forms/icon_calendar.jpg"
                                                                alt="" />
                                                        </div>
                                                        <div style="float: left; width: 160px; height: 25px; margin-left: 10px">
                                                            <div class="bubble-left">
                                                            </div>
                                                            <div class="bubble-inner">
                                                                Date format by MM/dd/yyyy</div>
                                                            <div class="bubble-right">
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.isHot %>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:CheckBox ID="cbHot" runat="server" />
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.isNew %>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:CheckBox ID="cbNew" runat="server" />
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Amount%>
                                                        :
                                                    </th>
                                                    <td>
                                                        <asp:TextBox ID="txtAmount" class="inp-form" MaxLength="18" runat="server"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th valign="top">
                                                        <%=Resources.Resource.Content%>
                                                        :
                                                    </th>
                                                    <td colspan="2">
                                                        <uc1:AjaxEditor Width="100%" Height="500px" ID="AjaxEditor1" runat="server" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th>
                                                        &nbsp;
                                                    </th>
                                                    <td valign="top">
                                                        <asp:Button ID="btnSave" OnClientClick="if(!CheckNull())return false;" class="form-submit"
                                                            OnClick="AllCommand" runat="server" />
                                                        <asp:Button ID="btnReset" class="form-reset" OnClick="AllCommand" runat="server" />
                                                        &nbsp;<asp:Button Style="margin-left: 5px;" ID="btnBack" class="form-back" OnClick="AllCommand"
                                                            Text="Back" runat="server" /><ajaxToolkit:CalendarExtender Format="MM/dd/yyyy" PopupButtonID="imgstart"
                                                                TargetControlID="txtStartDate" ID="CalendarExtender1" runat="server">
                                                            </ajaxToolkit:CalendarExtender>
                                                        <ajaxToolkit:CalendarExtender Format="MM/dd/yyyy" PopupButtonID="imgdeadline" TargetControlID="txtDeadline"
                                                            ID="CalendarExtender2" runat="server">
                                                        </ajaxToolkit:CalendarExtender>
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                            </table>
                                            <!-- end id-form  -->
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <img src="<%=Config.ApplicationUrl %>resources/images/admin/shared/blank.gif" width="695"
                                                height="1" alt="blank" />
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                </table>
                                <div class="clear">
                                </div>
                            </div>
                            <!--  end content-table-inner  -->
                        </td>
                        <td id="tbl-border-right">
                        </td>
                    </tr>
                    <tr>
                        <th class="sized bottomleft">
                        </th>
                        <td id="tbl-border-bottom">
                            &nbsp;
                        </td>
                        <th class="sized bottomright">
                        </th>
                    </tr>
                </table>
                <div class="clear">
                    &nbsp;</div>
            </div>
            <!--  end content -->
            <div class="clear">
                &nbsp;</div>
        </div>
        <!--  end content-outer -->
        <asp:HiddenField ID="hdfimg" runat="server" />

        <script language="javascript" type="text/javascript">CheckNull=function(){var control=$control('<%=txtName.ClientID %>');if(control.value.length<1 || Trim(control.value).length<1){control.focus();control.className='inp-form-error';jAlert('<%=string.Format(Resources.Resource.InputData,string.Format(Resources.Resource.Name.ToLower(),Resources.Resource.Category.ToLower())) %>','<%=Resources.Resource.Warning %>');return false;}control.className='inp-form';control=$control('<%=txtAlias.ClientID %>');if(control.value.length<1 || Trim(control.value).length<1){control.focus();control.className='inp-form-error';jAlert('<%=string.Format(Resources.Resource.InputData,Resources.Resource.Alias.ToLower()) %>','<%=Resources.Resource.Warning %>');return false;}control.className='inp-form';return true;}</script>

        <script type="text/javascript">
reloadpage =function() {
	$('.styledselect_form_1').selectbox({ inputClass: "styledselect_form_1" });
	$('.styledselect_form_2').selectbox({ inputClass: "styledselect_form_2" });
}
openUpload=function()
{
 ShowPopup(450,200,'<%=Config.ApplicationUrl%>pages/Upload.aspx','Upload file');
}
getImage=function(img)
{
$control('<%=txtImage.ClientID %>').value=img;
$control('<%=ImgAvarta.ClientID %>').src=img;
$control('<%=hdfimg.ClientID %>').value=img;
  UnLoading();
}
WareHouseImage=function()
{
ShowPopup(750,500,'<%= Config.ApplicationUrl%>pages/popup.aspx?ty=img','Warehouse Images');
}
        </script>

    </ContentTemplate>
</asp:UpdatePanel>
